'\"macro stdmacro
.\"
.\" Copyright (c) 2010 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.TH MRTG2PCP 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3mrtg2pcp\f1 \- import MRTG data and create a PCP archive
.SH SYNOPSIS
\&\fBmrtg2pcp\fR \fIhostname\fR \fIdevname\fR \fItimezone\fR \fIinfile\fR \fIoutfile\fR
.SH DESCRIPTION
\&\fBmrtg2pcp\fR is intended to read an \s-1MRTG\s0 log file as created by \fBmrtg\fR(1)
and translate this into a Performance Co-Pilot (\s-1PCP\s0) archive with the
basename \fIoutfile\fR.
The \fIhostname\fR, \fIdevname\fR, and \fItimezone\fR arguments
specify information about the system for which the statistics were gathered.
.PP
The resultant \s-1PCP\s0 archive may be used with all \s-1PCP\s0 client tools
to graph subsets of the data using \fBpmchart\fR(1),
perform data reduction and reporting, filter with
the \s-1PCP\s0 inference engine \fBpmie\fR(1), etc.
.PP
A series of physical files will be created with the prefix \fIoutfile\fR.
These are \fIoutfile\fR\fB.0\fR (the performance data),
\&\fIoutfile\fR\fB.meta\fR (the metadata that describes the performance data) and
\&\fIoutfile\fR\fB.index\fR (a temporal index to improve efficiency of replay
operations for the archive).
If any of these files exists already,
then \fBmrtg2pcp\fR will \fBnot\fR overwrite them and will exit with an error
message of the form
.PP
\&__pmLogNewFile: ``blah.0'' already exists, not over-written
.PP
\&\fBmrtg2pcp\fR is a Perl script that uses the PCP::LogImport Perl wrapper
around the \s-1PCP\s0 \fIlibpcp_import\fR
library, and as such could be used as an example to develop new
tools to import other types of performance data and create \s-1PCP\s0 archives.
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fP are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fP contains the local values for these variables.
The \fB$PCP_CONF\fP variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fP(5).
.SH SEE ALSO
.BR mrtg (1),
.BR pmchart (1),
.BR pmie (1),
.BR pmlogger (1),
.BR LOGIMPORT (3)
and
.BR PCP::LogImport (3).

.\" control lines for scripts/man-spell
.\" +ok+ MRTG {from MRTG2PCP}
